package yuan.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import yuan.entity.User;
import yuan.service.UserService;

import javax.xml.ws.RequestWrapper;
import java.util.List;

/**
 * @author 苑庆涛
 * @create 2019-12-31 16:07
 */

@Controller
public class HelloController {
    @Autowired
    private UserService userService;

    @RequestMapping("/hello")
    public String hello()
    {

        List<User> list=userService.findAll();

        for (User user:list) {
            System.out.println(user);
        }
//        System.out.println();
        return "hello";
    }
}
